<h1>Listing events</h1>

<table>
  <tr>
    <th>Evento</th>
    <th>Fecha</th>
    <th></th>
    <th></th>
  </tr>

<% user_session.events.each do |event| %>
  <tr>
    <td><%= event.name %></td>
    <td><%= event.date %></td>
    <td><%= link_to 'Editar', edit_event_path(event) %></td>
    <td><%= link_to 'Eliminar', event, method: :delete, data: { confirm: 'Esta seguro?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'Nuevo', new_event_path %>
